const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
    entry: './src/main.js',
    entry: ['babel-polyfill', './src/main.js'],
    mode: 'production',
    devServer: {
        host: '0.0.0.0',
        port: 9000
    },
    plugins: [new HtmlWebpackPlugin({
        template: 'index.html'
    })],
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: /(node_modules|bower_components)/,
                use: {
                    loader: 'babel-loader',
                    options: {
                        presets: ['@babel/preset-env']
                    }
                }
            }
        ]
    }
}